The invention relates to method and apparatus for processing input/output requests by connecting a host computer and an input/output control unit by a plurality of channel buses and, more particularly, method and apparatus for processing input/output requests by using channel buses of different transfer speeds.
FIG. 1 shows an example of an input/output (I/O) subsystem using magnetic tape apparatuses. The input/output subsystem is constructed by: a magnetic tape control unit 410 which functions as an input/output control unit; and a plurality of magnetic tape drive units 412-1 to 412-4 each of which functions as an input/output unit. Devices ID #1 to #4 are defined for the magnetic tape drive units 412-1 to 412-4. The magnetic tape control unit 410 has, for example, two input/output (I/O) ports 420-1 and 420-2. Port numbers (A) and (B) are defined for the I/O ports 420-1 and 420-2. Channel units 416-1 and 416-2 of host computers 414-1 and 414-2 are connected to the I/O ports 420-1 and 420-2 through channel buses 418-1 and 418-2. Channel numbers (A) and (B) are defined for the channel units 416-1 and 416-2. In the following description, the above components are merely expressed as channels (A) and (B) and ports (A) and (B).
A processing operation for an input/output request from the host computer will now be briefly described. For example, it is now assumed that an input/output request such as a write request for a magnetic tape loaded in the magnetic tape drive unit 412-1 was generated by the host computer 414-1. The channel (A) of the host computer 414-1 first generates a start I/O request (activation request) which designates a device machine No. #1 of the magnetic tape drive unit 412-1 to the I/O port (A). In response to the start I/O request from the port (A), the magnetic tape control unit 410 discriminates whether the port (B) has been coupled to the channel (B) or not. When the port (B) is not being coupled, the magnetic tape control unit 410 accepts the start I/O request for the port (A) and is coupled with the channel (A) and responds a normal end of the start I/O request and executes a transferring process of a command sequence.
When the start I/O request from the channel (A) is received by the port (A), if the channel (B) has been coupled, a busy response is returned. When the transferring process by the coupling of the channel (B) and the port (B) is finished, a status response of a unit end is performed from the port (B) to the channel (B) and they are disconnected. In association with the disconnection, a busy end indicative of a busy cancellation is also performed from the port (A) to the channel (A). An activation request is again performed from the channel (A) in the waiting state to the port (A) by the busy response.
In the input/output control unit for processing input/output requests from such a plurality of channels, it is necessary to equivalently execute services for the input/output request of each channel. However, in the case where transfer speeds of the channel buses differ, or a different transfer protocol is used in dependence on the channel, like an electric channel bus or an optical channel bus, there is a tendency such that the services are one-sided to the high speed channel by all means, so that there is a problem of reduction of the services to the low speed channel. As a system environment, in many cases, the high speed host computer and the low/middle speed host computer mixedly exist. Further, the high speed host computer and the middle/low speed host computer are connected so that they can be cross-called. In such a case, a problem similar to that mentioned above occurs. This point will now be described with reference to FIG. 1. For instance, it is now assumed that the channel (A) is a low speed channel and the channel (B) is a high speed channel. An input/output control in this case is executed as shown in, for example, a time chart of FIG. 2.
When a start I/O request 500 is sent from the high speed channel (B) to the port (B) and a coupling completion response 502 by the normal end is obtained, transferring processes 504 and 506 of a command sequence between the high speed channel (B) and the port (B) are executed. Now, assuming that a start I/O port request 508 is generated from the low speed channel (A) to the port (A) for periods of time of the transferring processes 504 and 506, since the port (B) has been coupled, a busy response 510 is returned. After completion of the transferring process 506, a unit end 512 is returned from the port (B) to the high speed channel (B) and the coupling is disconnected. In association with the unit end 512, a busy end 514 indicative of the busy cancellation is subsequently returned from the port (A) to the low speed channel (A) in the waiting state of the busy cancellation. When it is now assumed that the next input/output request has been generated from the high speed channel (B) which received the unit end 512, a start I/O request 516 as an activation request is immediately outputted from the high speed channel (B) to the port (B). After a coupling completion response 518 was performed, transferring processes 520 and 522 are again executed. On the other hand, the low speed channel (A) which received the busy end 514 recognizes the busy cancellation and generates a start I/O request 524 to the port (A). However, it takes a time until the start I/O request 524 is received by the port (A) after the busy end 514 was outputted. For such a period of time, the port (B) has been coupled by the start I/O request 516 from the high speed channel (B). Therefore, for the start I/O request 524 from the low speed channel (A), a busy response 526 is again outputted from the port (A) and the low speed channel (A) again waits for a busy cancellation. Therefore, so long as the input/output request is continuously performed to the high speed channel (B), a loop process of the start I/O request, busy response, and busy end is repeated for the low speed channel (A). The input/output request is not accepted and the services deteriorate. In the worst case, since such a loop process is executed for a long time, there is a problem of the occurrence of a check condition such that the host computer of the low speed channel (A) judges that some abnormality occurred in the channel unit or input/output subsystem. In dependence on a control method, when the input/output request from the high speed channel is continuously performed, there is also no time to respond to the busy end in association with the end of the coupling on the high speed channel side for the low speed channel (A). In such a case, the low speed channel in the busy cancellation waiting state cannot obtain the busy end even if it waits for the busy cancellation for a long time. A situation such that the busy cancellation waiting times out and the input/output request of the low speed channel is finished as an error occurs. As a method of solving the above problem such that the services of the input/output control apparatus are one-sided to a specific channel as mentioned above, there is a method of time-divisionally changing the priority of the route so that the services are equivalently given to each input/output port.
FIG. 3 shows the case where eight channels of ports (A to H) are provided for the input/output control unit. Priorities are sequentially allocated to the ports (A to H) by clocks in accordance with that order. It is now assumed that, for example, there are activation requests to all of the input/output ports (A to H) at time to. In this instance, there is a clock in a slot of the I/O port (C), the priority is set, and the coupling at the I/O port (C) is accepted. With respect to the other I/O ports, the busy response is automatically reported. Now, assuming that there are two activation requests of the I/O ports (B and E) at time t0, the coupling of the I/O port (E) is accepted to a slot of the I/O port (E) at time t1 when the clock changes. With respect to the I/O port (B), the busy response is automatically reported. Such a method of changing the priority of the route time-divisionally is effective in the case where each channel bus has the same performance and also has the same protocol such as electric channel bus or optical channel bus. However, in the case where the transfer speeds are different or the protocols in which an electric channel and an optical channel mixedly exist are different, the above method is not so effective.
According to the present invention, there are provided method and apparatus in which even if speeds of a plurality of channel buses for connecting a channel of a host computer and input/output ports of an input/output control unit are different, processes for input/output requests can be equivalently executed without one-siding to a specific input/output port.
First, the invention provides an input/output control unit in which a plurality of channels on the upper apparatus side are connected to a plurality of input/output ports through channel buses of different transfer speeds. Specifically speaking, the invention provides an input/output control unit having a high speed input/output port and a low speed input/output port connected respectively to a high speed channel unit and a low speed channel unit on the host side through channel buses of different transfer speeds.
According to the first form of the invention, each of, for example, two input/output ports (A, B) in the input/output control unit has an activation time measurement storing section for measuring and storing an activation time from a time point when a response of a busy cancellation in association with the end of the transfer of the other input/output ports to a time point when the next activation request is received. When the activation request is received from a high speed channel (B) to a high speed input/output port (B) by a route control section, an activation request for the low speed input/output port (B) is waited for the activation time T2 of the low speed input/output port (B) stored in the activation time measurement storing section. When there is an activation request to the low speed input/output port (B) for such a waiting time, the I/O port (B) is coupled to a corresponding low speed channel (B) and a transferring process is executed. When there is an input/output request from a high speed channel unit (A) for a period of time during which the low speed input/output port (B) waits for the activation request, a busy response is returned and the input/output request is not accepted. When there is no activation request from the low speed input/output port (B) for the waiting time, the high speed channel unit (A) is coupled to the high speed input/output port (A) and the transferring process is executed.
The first form of the invention further has a busy ratio measurement storing section for measuring a busy ratio of each of the input/output ports and recording it. In this case, each time activation times T1 and T2 of the input/output ports (A and B) are measured, the activation time measurement storing section produces a maximum time Tmax, an average time Tav, and a minimum time Tmin and stores. The route control section selects the maximum time, average time, or minimum time so as to equalize busy ratios R1 and R2 of the input/output ports (A and B) stored in the busy ratio measurement storing section and sets the waiting time T1 of the activation request of the low speed input/output port (B). A busy ratio (R) has a value obtained by dividing the measured number of busy response times by the number of input/output times from the channel for every input/output port (A and B). When setting the waiting time based on the busy ratios, when the busy ratio R1 of the low speed input/output port (A) is larger than the busy ratio R2 of the high speed input/output port (B), the maximum time Tmax is selected. When the busy ratio R1 of the low speed input/output port (A) is equal to the busy ratio R2 of the high speed input/output port (B), the average time Tav is selected. Further, when the busy ratio R1 of the low speed input/output port (A) is smaller than the busy ratio R2 of the high speed input/output port (B), the minimum time Tmin is selected.
A modification of the first form of the invention is constructed as follows. First, an activation time measuring section to measure an activation time from a time point when a busy cancellation is responded from the low speed input/output port (A) to the low speed channel (A) to a time point when an activation request is received is provided for the input/output control unit. At the time of a response of the busy cancellation from the low speed input/output port (A), the route control section allows a processing request from the high speed channel (B) for the high speed input/output port (B) to be waited for the measured activation time and accepts the processing request from the low speed channel (B) for the low speed input/output port (B) for such a period of time. It is also possible to provide a waiting time setting section for varying the waiting time of the route control section on the basis of the measurement time of the activation time measuring section. Further, a waiting time setting section for setting the waiting time of the route control section by an input operation of an operator can be also provided.
The first form of the invention as mentioned above can be regarded as a learning system. As one of factors of the phenomenon such that the services of the input/output control are one-sided to the high speed channel unit, there can be mentioned a speed which is required from a time point when the channel in the busy cancellation waiting state receives a notification (busy end) of the busy cancellation to a time point when it generates an activation request. Generally, such a time is short in the high speed channel and is long in the low speed channel. Therefore, a timer is provided for each of the input/output ports, thereby dynamically measuring an activation time until the activation request is received after the busy cancellation was responded and storing. The measurement result of the activation time is divisionally calculated and stored with respect to the maximum value, minimum value, and average value. For example, even when the high speed input/output port continuously accepts the activation request after the unit end, an acceptance response is not immediately executed but the I/O control unit waits for the activation request of the low speed port for only the activation time. When there is an activation request from the low speed input/output port, which one of the high speed port and the low speed port is accepted is judged, thereby preventing the services from being prejudiced to only one side. A busy ratio is used as one index indicative of a one-sided state of services. The busy ratio is obtained by dividing the number of busy responses obtained by a busy response counter by a value of an activation number counter for counting the number of activation times from the channels. The waiting time is determined so as to set the busy ratio of each input/output port to a value as small as possible and so as not to increase differences of the values of the busy ratios of the input/output ports. After the response of the busy cancellation, for example, when the busy ratio of the input/output port which responded is high, the apparatus waits at a value near the maximum value of the activation time. On the contrary, when the busy ratio of the input/output port is low and the busy ratio of the other input/output port is high, the apparatus waits at a value near the minimum value. As mentioned above, according to the first form of the invention, the services of each channel can be uniformed by a self learning.
According to the second form of the invention, when a loop such that a busy response to the activation request and a response of a busy cancellation (busy end) in association with the end of the transfer of the other input/output ports are repeated occurs in any one of a plurality of input/output ports, the number of occurring times of such a loop is counted and when a judging section judges that such a number exceeds a predetermined value, an acceptance of the activation request is preferentially allocated to the input/output port judged by the route control section. That is, the route control section accepts only the activation request for the input/output port to which the acceptance of the activation request was preferentially allocated and makes a busy response to the activation request to the other input/output ports.
According to the second form of the invention as mentioned above, when the loop process of the busy response and busy end response continues for a long time, a check condition occurs on the host side. Therefore, such a state is prevented. Namely, the number of loop processing times of the activation request, busy response, and busy end response is detected by the counter. The services are preferentially given to the input/output port in which a count value exceeds a predetermined value. A busy is responded to the other I/O ports. After completion of the preferential process at the input/output port, the counter of such an input/output port is reset. Thus, the check condition which occurs when the busy response and the busy end response are looped can be avoided.
According to the third form of the invention, a busy response time storing section stores a time at which a busy response is performed for an activation request with respect to each of a plurality of input/output ports (A and B). A processing port deciding section decides the input/output port having the oldest response time among the busy response times to the next processing port every completion of the process for the activation request. The route control section preferentially allocates the acceptance of the activation request to the decided input/output port.
Such a third form of the invention can be regarded as a time series processing system. Namely, the time at which the busy response was performed at each input/output port is stored and when the process with the channel is finished, a busy response time of each input/output port is examined. A busy end is reported to the input/output port indicative of the oldest time and the services are preferentially executed.
According to the fourth form of the invention, when the specific channel (B) and the input/output port (B) are coupled by the route control section, if there is an activation request to the other input/output port (A) from the other channel (A), a retry interruption processing section responds a retry status from the other input/output port (B) and disconnects the coupling with the other channel unit (B). When the coupling of the input/output port (A) and the channel (A) which are being processed at present is finished, the retry interruption processing section notifies the interruption of the retry start from the other input/output port (A) to the other channel (A), thereby retrying the activation request.
Such a fourth form of the invention can be regarded as a retry interruption system. That is, during the coupling with the channel, when an activation from the other channel comes, the status to request the retry of the channel is reported in place of the busy response and the coupling with the channel which was activated later is once disconnected. When the coupling with the channel that is at present being processed is finished, the retry start is interrupted to the channel which has already performed the retry request and the recoupling is performed. By responding the retry status in place of the busy response as mentioned above, which one of the input/output ports is recoupled on the input/output control unit side can be determined. The services can be averagely given to each input/output port.
According to the fifth form of the invention, in the case where predetermined interrupting conditions are satisfied by the route control section when the specific channel (B) and the input/output port (B) are coupled, for example, in the case where an interruption timer times up, the interrupting process is executed by the retry interruption processing section. The retry interrupting process is executed by the following procedure.
A retry status is responded to the channel (B) from the input/output port (B), the process is interrupted, and the coupling is disconnected.
When the disconnection is finished, the busy response statuses so far are checked with respect to all of the ports (A and B) and the preferential processing port is decided. For example, the port (A) which performed the busy response before is determined as a preferential processing port.
Subsequently, an end status is responded from the preferential processing port (A) to the channel (A), thereby performing the activation request.
When the transferring process in association with the activation request is finished, the retry interruption processing section notifies the interruption of the retry start from the input/output port (B) to the channel (B), thereby restarting the interrupted process.
The interrupting conditions of the retry interruption are set as follows.
I. The coupling time of the input/output port reaches a predetermined time.
II. The number of command processing times of the input/output ports coupled reaches a predetermined value.
III. When the input/output port is coupled, the busy ratio reaches a predetermined value by the busy response for the activation request to the other input/output ports.
And the like.
Such a fifth form of the invention can be regarded as a modification of the retry interruption system of the fourth form. First, when predetermined interrupting conditions (predetermined time, predetermined number of command processing times, predetermined busy ratio, etc.) are satisfied during the coupling with the channel, an interruption is generated, a status of a channel retry request is responded to the channel which has already been coupled at present, the process is interrupted, and the coupling is once disconnected. After that, with respect to all of the buses, whether the busy response has been performed before or not is discriminated, an interruption factor is analyzed as a check factor, and to which input/output port the services are given is determined. After the processing port was decided, the unit end is responded from such a port, and the process is preferentially executed. After completion of the preferential process, an interruption of the retry start is notified to the channel which performed the status response of the retry request. The channel is again coupled and the interrupted process is restarted. Thus, a situation such that the process of the high speed channel continues and the unit end to cancel the busy response cannot be reported by the low speed channel can be avoided.
In the sixth form of the invention, a command analysis executing section is provided every plurality of input/output ports (A and B). For example, the command analysis executing section analyzes whether a command received in association with an activation request by the input/output port (A) is an executable command or not during the coupling of the input/output port (B). When it is the executable command, the activation request is accepted and the command process for an internal resource is executed. Specifically speaking, when a data transfer of the internal resource is being executed by the coupling of the input/output port (B), in case of other internal resources and a command of a control system which is not accompanied with the data transfer, the activation request of the input/output port (A) is accepted and a command process for other internal resources is executed. The internal resources are a plurality of input/output apparatuses having independent control buses for a data bus, for instance, magnetic tape drive units.
Such a sixth form of the invention can be regarded as an intelligent type of an input/output port which functions as a channel switch. That is, during a command process of another input/output port, a check is made to see if the command received by the input/output port itself can be executed or not. When it can be executed, a process for a drive unit of a lower order is executed, thereby reducing the number of busy response times. For instance, during the coupling of another input/output port, if there is an activation request in a certain input/output port, it is accepted and a command is analyzed and in case of internal resources which are common to the input/output port during the coupling, for example, in case of a command which doesn""t use the data bus such as a control command of a motion system or sense system, such a command is validly accepted and executed. Such an intelligent apparatus forming process is effective in the case where the data bus and a command processing bus are different or, even in case of a common bus, the apparatus has a hardware of a common bus configuration such that both of a data transfer and a data transfer for a command process can be concurrently executed.
The above and other objects, features, and advantages of the present invention will become more apparent from the following detailed description with reference to the drawings.